package com.lingnan.entity.dto;

import jakarta.validation.constraints.*;
import lombok.Data;

import java.util.Date;


@Data
public class UserAccountDTO {
    private Long id;

    @NotBlank(message = "用户名不能为空")
    @Size(max = 50, message = "用户名长度不能超过50个字符")
    private String username;

   /* @NotBlank(message = "密码不能为空")
    @Size(max = 100, message = "密码长度不能超过100个字符")*/
    private String password;

    @Email(message = "邮箱格式不正确")
    @Size(max = 100, message = "邮箱长度不能超过100个字符")
    private String email;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    @Min(value = 0, message = "用户类型必须为0-3之间")
    @Max(value = 3, message = "用户类型必须为0-3之间")
    private Integer userType;

    private Boolean isPrimary = false;

    @Min(value = 0, message = "状态必须为0或1")
    @Max(value = 1, message = "状态必须为0或1")
    private Integer status = 1;
}